package whu.cachhe.makeorder.domain;

import android.os.Parcel;
import android.os.Parcelable;
import android.support.annotation.NonNull;

/**
 * Created by CocoAdapter on 2018/4/15.
 */

public class User implements Parcelable {
    private String mainSysId;
    private String reserveSysId;
    private int userType;

    public User(Parcel in) {
        mainSysId = in.readString();
        reserveSysId = in.readString();
        userType = in.readInt();
    }

    public User(String mainSysId, String reserveSysId, int userType) {
        this.mainSysId = mainSysId;
        this.reserveSysId = reserveSysId;
        this.userType = userType;
    }

    public static final Creator<User> CREATOR = new Creator<User>() {
        @Override
        public User createFromParcel(Parcel in) {
            return new User(in);
        }

        @Override
        public User[] newArray(int size) {
            return new User[size];
        }
    };

    public String getMainSysId() {
        return mainSysId;
    }

    public String getReserveSysId() {
        return reserveSysId;
    }

    public int getUserType() {
        return userType;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(mainSysId);
        dest.writeString(reserveSysId);
        dest.writeInt(userType);
    }
}
